#include "pjlib.h"

int main2()
{
    pj_init();
    PJ_LOG(3,("hello","tata"));

    pj_hostent he;
    pj_status_t rc;
    pj_str_t host = pj_str("localhost");

    rc = pj_gethostbyname( &host, &he );

    if( rc != PJ_SUCCESS )
    {
        PJ_LOG(3, ("main","get host address fail"));
    }else
    {
        PJ_LOG(3, ("main","host address length %d",he.h_length ));
    }


    pj_sockaddr ifs[10];
    unsigned count = 10;
    rc = pj_enum_ip_interface( pj_AF_UNSPEC(), &count, ifs );
    if( rc != PJ_SUCCESS )
    {
        PJ_LOG(3, ("main","get ips fail "));
    }else
    {
        PJ_LOG(3, ("main", "local ips %d", count ));
    }





    return 0;
}
